package cn.njyd.corejava.thread.myday04;

import java.util.concurrent.ArrayBlockingQueue;

public class ArrayBlockingQueueDemo01 {
    public static void main(String[] args) throws InterruptedException {
        ArrayBlockingQueue<String> queue = new ArrayBlockingQueue<>(5);
        queue.put("name-1");
        queue.put("name-2");
        queue.put("name-3");
        queue.put("name-4");
        queue.put("name-5");
//        queue.put("name-6");
        System.out.println(queue.take());
    }
}
